import pandas as pd
import send_email

# import xlrd
filePath = r'D:\Users\12717\Downloads\python\code\1.xlsx'
df = pd.read_excel(filePath, sheet_name='Sheet1')
# print(df.values)

for row in df.values:
    # print(row)
    empId = row[0]
    empName = row[1]
    empEmail = row[2]
    empSalaryFileName = row[3]
    print(f'员工号={empId}，姓名={empName}，邮箱={empEmail}，工资单文件名称={empSalaryFileName}')

    print('开始发送邮件')
    send_email.send(empEmail,
                    empName + '工资单',
                    empName + '：你好，请查收工资单',
                    empSalaryFileName)
